<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>FakeMediaPeriod (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="FakeMediaPeriod (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.testutil</a></div>
<h2 title="Class FakeMediaPeriod" class="title">Class FakeMediaPeriod</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.testutil.FakeMediaPeriod</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code>, <code><a href="../source/SequenceableLoader.html" title="interface in com.google.android.exoplayer2.source">SequenceableLoader</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">FakeMediaPeriod</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>
implements <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></pre>
<div class="block">Fake <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a> that provides tracks from the given <a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source"><code>TrackGroupArray</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="FakeMediaPeriod.TrackDataFactory.html" title="interface in com.google.android.exoplayer2.testutil">FakeMediaPeriod.TrackDataFactory</a></span></code></th>
<td class="colLast">
<div class="block">A factory to create the test data for a particular track.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.source.MediaPeriod">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.source.<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></h3>
<code><a href="../source/MediaPeriod.Callback.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod.Callback</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.upstream.Allocator,long,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher)">FakeMediaPeriod</a></span>&#8203;(<a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroupArray,
               <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
               long&nbsp;singleSampleTimeUs,
               <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher)</code></th>
<td class="colLast">
<div class="block">Constructs a FakeMediaPeriod with a single sample for each track in <code>trackGroupArray</code>.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.upstream.Allocator,long,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher,com.google.android.exoplayer2.drm.DrmSessionManager,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,boolean)">FakeMediaPeriod</a></span>&#8203;(<a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroupArray,
               <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
               long&nbsp;singleSampleTimeUs,
               <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher,
               <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a>&nbsp;drmSessionManager,
               <a href="../drm/DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a>&nbsp;drmEventDispatcher,
               boolean&nbsp;deferOnPrepared)</code></th>
<td class="colLast">
<div class="block">Constructs a FakeMediaPeriod with a single sample for each track in <code>trackGroupArray</code>.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.upstream.Allocator,com.google.android.exoplayer2.testutil.FakeMediaPeriod.TrackDataFactory,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher,com.google.android.exoplayer2.drm.DrmSessionManager,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,boolean)">FakeMediaPeriod</a></span>&#8203;(<a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroupArray,
               <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
               <a href="FakeMediaPeriod.TrackDataFactory.html" title="interface in com.google.android.exoplayer2.testutil">FakeMediaPeriod.TrackDataFactory</a>&nbsp;trackDataFactory,
               <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher,
               <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a>&nbsp;drmSessionManager,
               <a href="../drm/DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a>&nbsp;drmEventDispatcher,
               boolean&nbsp;deferOnPrepared)</code></th>
<td class="colLast">
<div class="block">Constructs a FakeMediaPeriod.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#continueLoading(long)">continueLoading</a></span>&#8203;(long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Attempts to continue loading.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected <a href="FakeSampleStream.html" title="class in com.google.android.exoplayer2.testutil">FakeSampleStream</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSampleStream(com.google.android.exoplayer2.upstream.Allocator,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher,com.google.android.exoplayer2.drm.DrmSessionManager,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format,java.util.List)">createSampleStream</a></span>&#8203;(<a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
                  <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher,
                  <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a>&nbsp;drmSessionManager,
                  <a href="../drm/DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a>&nbsp;drmEventDispatcher,
                  <a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;initialFormat,
                  <a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="FakeSampleStream.FakeSampleStreamItem.html" title="class in com.google.android.exoplayer2.testutil" target="_top">FakeSampleStream.FakeSampleStreamItem</a>&gt;&nbsp;fakeSampleStreamItems)</code></th>
<td class="colLast">
<div class="block">Creates a new <a href="FakeSampleStream.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeSampleStream</code></a>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#discardBuffer(long,boolean)">discardBuffer</a></span>&#8203;(long&nbsp;positionUs,
             boolean&nbsp;toKeyframe)</code></th>
<td class="colLast">
<div class="block">Discards buffered media up to the specified position.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAdjustedSeekPositionUs(long,com.google.android.exoplayer2.SeekParameters)">getAdjustedSeekPositionUs</a></span>&#8203;(long&nbsp;positionUs,
                         <a href="../SeekParameters.html" title="class in com.google.android.exoplayer2">SeekParameters</a>&nbsp;seekParameters)</code></th>
<td class="colLast">
<div class="block">Returns the position to which a seek will be performed, given the specified seek position and
 <a href="../SeekParameters.html" title="class in com.google.android.exoplayer2"><code>SeekParameters</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBufferedPositionUs()">getBufferedPositionUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an estimate of the position up to which data is buffered for the enabled tracks.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNextLoadPositionUs()">getNextLoadPositionUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the next load time, or <a href="../C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> if loading has finished.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTrackGroups()">getTrackGroups</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="../source/TrackGroup.html" title="class in com.google.android.exoplayer2.source"><code>TrackGroup</code></a>s exposed by the period.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLoading()">isLoading</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the media period is currently loading.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeThrowPrepareError()">maybeThrowPrepareError</a></span>()</code></th>
<td class="colLast">
<div class="block">Throws an error that's preventing the period from becoming prepared.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prepare(com.google.android.exoplayer2.source.MediaPeriod.Callback,long)">prepare</a></span>&#8203;(<a href="../source/MediaPeriod.Callback.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod.Callback</a>&nbsp;callback,
       long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Prepares this media period asynchronously.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readDiscontinuity()">readDiscontinuity</a></span>()</code></th>
<td class="colLast">
<div class="block">Attempts to read a discontinuity.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reevaluateBuffer(long)">reevaluateBuffer</a></span>&#8203;(long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Re-evaluates the buffer given the playback position.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release()">release</a></span>()</code></th>
<td class="colLast">
<div class="block">Releases the media period.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#seekToUs(long)">seekToUs</a></span>&#8203;(long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Attempts to seek to the specified position in microseconds.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#selectTracks(com.google.android.exoplayer2.trackselection.ExoTrackSelection%5B%5D,boolean%5B%5D,com.google.android.exoplayer2.source.SampleStream%5B%5D,boolean%5B%5D,long)">selectTracks</a></span>&#8203;(@NullableType <a href="../trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[]&nbsp;selections,
            boolean[]&nbsp;mayRetainStreamFlags,
            @NullableType <a href="../source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a>[]&nbsp;streams,
            boolean[]&nbsp;streamResetFlags,
            long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Performs a track selection.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDiscontinuityPositionUs(long)">setDiscontinuityPositionUs</a></span>&#8203;(long&nbsp;discontinuityPositionUs)</code></th>
<td class="colLast">
<div class="block">Sets a discontinuity position to be returned from the next call to <a href="#readDiscontinuity()"><code>readDiscontinuity()</code></a>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPreparationComplete()">setPreparationComplete</a></span>()</code></th>
<td class="colLast">
<div class="block">Allows the fake media period to complete preparation.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSeekToUsOffset(long)">setSeekToUsOffset</a></span>&#8203;(long&nbsp;seekOffsetUs)</code></th>
<td class="colLast">
<div class="block">Sets an offset to be applied to positions returned by <a href="#seekToUs(long)"><code>seekToUs(long)</code></a>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.source.MediaPeriod">
<!--   -->
</a>
<h3>Methods inherited from interface&nbsp;com.google.android.exoplayer2.source.<a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></h3>
<code><a href="../source/MediaPeriod.html#getStreamKeys(java.util.List)">getStreamKeys</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.upstream.Allocator,long,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FakeMediaPeriod</h4>
<pre>public&nbsp;FakeMediaPeriod&#8203;(<a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroupArray,
                       <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
                       long&nbsp;singleSampleTimeUs,
                       <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher)</pre>
<div class="block">Constructs a FakeMediaPeriod with a single sample for each track in <code>trackGroupArray</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>trackGroupArray</code> - The track group array.</dd>
<dd><code>allocator</code> - An <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream"><code>Allocator</code></a>.</dd>
<dd><code>singleSampleTimeUs</code> - The timestamp to use for the single sample in each track, in
     microseconds.</dd>
<dd><code>mediaSourceEventDispatcher</code> - A dispatcher for <a href="../source/MediaSourceEventListener.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSourceEventListener</code></a> events.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.upstream.Allocator,long,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher,com.google.android.exoplayer2.drm.DrmSessionManager,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FakeMediaPeriod</h4>
<pre>public&nbsp;FakeMediaPeriod&#8203;(<a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroupArray,
                       <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
                       long&nbsp;singleSampleTimeUs,
                       <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher,
                       <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a>&nbsp;drmSessionManager,
                       <a href="../drm/DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a>&nbsp;drmEventDispatcher,
                       boolean&nbsp;deferOnPrepared)</pre>
<div class="block">Constructs a FakeMediaPeriod with a single sample for each track in <code>trackGroupArray</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>trackGroupArray</code> - The track group array.</dd>
<dd><code>allocator</code> - An <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream"><code>Allocator</code></a>.</dd>
<dd><code>singleSampleTimeUs</code> - The timestamp to use for the single sample in each track, in
     microseconds.</dd>
<dd><code>mediaSourceEventDispatcher</code> - A dispatcher for <a href="../source/MediaSourceEventListener.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSourceEventListener</code></a> events.</dd>
<dd><code>drmSessionManager</code> - The <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionManager</code></a> used for DRM interactions.</dd>
<dd><code>drmEventDispatcher</code> - A dispatcher for <a href="../drm/DrmSessionEventListener.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionEventListener</code></a> events.</dd>
<dd><code>deferOnPrepared</code> - Whether <a href="../source/MediaPeriod.Callback.html#onPrepared(com.google.android.exoplayer2.source.MediaPeriod)"><code>MediaPeriod.Callback.onPrepared(MediaPeriod)</code></a> should be called only
     after <a href="#setPreparationComplete()"><code>setPreparationComplete()</code></a> has been called. If <code>false</code> preparation
     completes immediately.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.upstream.Allocator,com.google.android.exoplayer2.testutil.FakeMediaPeriod.TrackDataFactory,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher,com.google.android.exoplayer2.drm.DrmSessionManager,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,boolean)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FakeMediaPeriod</h4>
<pre>public&nbsp;FakeMediaPeriod&#8203;(<a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroupArray,
                       <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
                       <a href="FakeMediaPeriod.TrackDataFactory.html" title="interface in com.google.android.exoplayer2.testutil">FakeMediaPeriod.TrackDataFactory</a>&nbsp;trackDataFactory,
                       <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher,
                       <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a>&nbsp;drmSessionManager,
                       <a href="../drm/DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a>&nbsp;drmEventDispatcher,
                       boolean&nbsp;deferOnPrepared)</pre>
<div class="block">Constructs a FakeMediaPeriod.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>trackGroupArray</code> - The track group array.</dd>
<dd><code>allocator</code> - An <a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream"><code>Allocator</code></a>.</dd>
<dd><code>trackDataFactory</code> - The <a href="FakeMediaPeriod.TrackDataFactory.html" title="interface in com.google.android.exoplayer2.testutil"><code>FakeMediaPeriod.TrackDataFactory</code></a> creating the data.</dd>
<dd><code>mediaSourceEventDispatcher</code> - A dispatcher for media source events.</dd>
<dd><code>drmSessionManager</code> - The <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionManager</code></a> used for DRM interactions.</dd>
<dd><code>drmEventDispatcher</code> - A dispatcher for <a href="../drm/DrmSessionEventListener.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionEventListener</code></a> events.</dd>
<dd><code>deferOnPrepared</code> - Whether <a href="../source/MediaPeriod.Callback.html#onPrepared(com.google.android.exoplayer2.source.MediaPeriod)"><code>MediaPeriod.Callback.onPrepared(MediaPeriod)</code></a> should be called only
     after <a href="#setPreparationComplete()"><code>setPreparationComplete()</code></a> has been called. If <code>false</code> preparation
     completes immediately.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="setDiscontinuityPositionUs(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDiscontinuityPositionUs</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setDiscontinuityPositionUs&#8203;(long&nbsp;discontinuityPositionUs)</pre>
<div class="block">Sets a discontinuity position to be returned from the next call to <a href="#readDiscontinuity()"><code>readDiscontinuity()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>discontinuityPositionUs</code> - The position to be returned, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="setPreparationComplete()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPreparationComplete</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setPreparationComplete()</pre>
<div class="block">Allows the fake media period to complete preparation. May be called on any thread.</div>
</li>
</ul>
<a id="setSeekToUsOffset(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSeekToUsOffset</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setSeekToUsOffset&#8203;(long&nbsp;seekOffsetUs)</pre>
<div class="block">Sets an offset to be applied to positions returned by <a href="#seekToUs(long)"><code>seekToUs(long)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>seekOffsetUs</code> - The offset to be applied, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="release()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;release()</pre>
<div class="block">Releases the media period.</div>
</li>
</ul>
<a id="prepare(com.google.android.exoplayer2.source.MediaPeriod.Callback,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepare</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;prepare&#8203;(<a href="../source/MediaPeriod.Callback.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod.Callback</a>&nbsp;callback,
                    long&nbsp;positionUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#prepare(com.google.android.exoplayer2.source.MediaPeriod.Callback,long)">MediaPeriod</a></code></span></div>
<div class="block">Prepares this media period asynchronously.

 <p><code>callback.onPrepared</code> is called when preparation completes. If preparation fails,
 <a href="../source/MediaPeriod.html#maybeThrowPrepareError()"><code>MediaPeriod.maybeThrowPrepareError()</code></a> will throw an <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top"><code>IOException</code></a>.

 <p>If preparation succeeds and results in a source timeline change (e.g. the period duration
 becoming known), <a href="../source/MediaSource.MediaSourceCaller.html#onSourceInfoRefreshed(com.google.android.exoplayer2.source.MediaSource,com.google.android.exoplayer2.Timeline)"><code>MediaSource.MediaSourceCaller.onSourceInfoRefreshed(MediaSource, Timeline)</code></a> will be
 called before <code>callback.onPrepared</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#prepare(com.google.android.exoplayer2.source.MediaPeriod.Callback,long)">prepare</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - Callback to receive updates from this period, including being notified when
     preparation completes.</dd>
<dd><code>positionUs</code> - The expected starting position, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="maybeThrowPrepareError()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maybeThrowPrepareError</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;maybeThrowPrepareError()
                            throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#maybeThrowPrepareError()">MediaPeriod</a></code></span></div>
<div class="block">Throws an error that's preventing the period from becoming prepared. Does nothing if no such
 error exists.

 <p>This method is only called before the period has completed preparation.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#maybeThrowPrepareError()">maybeThrowPrepareError</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - The underlying error.</dd>
</dl>
</li>
</ul>
<a id="getTrackGroups()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTrackGroups</h4>
<pre class="methodSignature">public&nbsp;<a href="../source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;getTrackGroups()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#getTrackGroups()">MediaPeriod</a></code></span></div>
<div class="block">Returns the <a href="../source/TrackGroup.html" title="class in com.google.android.exoplayer2.source"><code>TrackGroup</code></a>s exposed by the period.

 <p>This method is only called after the period has been prepared.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#getTrackGroups()">getTrackGroups</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="../source/TrackGroup.html" title="class in com.google.android.exoplayer2.source"><code>TrackGroup</code></a>s.</dd>
</dl>
</li>
</ul>
<a id="selectTracks(com.google.android.exoplayer2.trackselection.ExoTrackSelection[],boolean[],com.google.android.exoplayer2.source.SampleStream[],boolean[],long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>selectTracks</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;selectTracks&#8203;(@NullableType <a href="../trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[]&nbsp;selections,
                         boolean[]&nbsp;mayRetainStreamFlags,
                         @NullableType <a href="../source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a>[]&nbsp;streams,
                         boolean[]&nbsp;streamResetFlags,
                         long&nbsp;positionUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#selectTracks(com.google.android.exoplayer2.trackselection.ExoTrackSelection%5B%5D,boolean%5B%5D,com.google.android.exoplayer2.source.SampleStream%5B%5D,boolean%5B%5D,long)">MediaPeriod</a></code></span></div>
<div class="block">Performs a track selection.

 <p>The call receives track <code>selections</code> for each renderer, <code>mayRetainStreamFlags</code>
 indicating whether the existing <a href="../source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> can be retained for each selection, and
 the existing <code>stream</code>s themselves. The call will update <code>streams</code> to reflect the
 provided selections, clearing, setting and replacing entries as required. If an existing sample
 stream is retained but with the requirement that the consuming renderer be reset, then the
 corresponding flag in <code>streamResetFlags</code> will be set to true. This flag will also be set
 if a new sample stream is created.

 <p>Note that previously passed <a href="../trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection"><code>TrackSelections</code></a> are no longer valid,
 and any references to them must be updated to point to the new selections.

 <p>This method is only called after the period has been prepared.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#selectTracks(com.google.android.exoplayer2.trackselection.ExoTrackSelection%5B%5D,boolean%5B%5D,com.google.android.exoplayer2.source.SampleStream%5B%5D,boolean%5B%5D,long)">selectTracks</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>selections</code> - The renderer track selections.</dd>
<dd><code>mayRetainStreamFlags</code> - Flags indicating whether the existing sample stream can be retained
     for each track selection. A <code>true</code> value indicates that the selection is equivalent
     to the one that was previously passed, and that the caller does not require that the sample
     stream be recreated. If a retained sample stream holds any references to the track
     selection then they must be updated to point to the new selection.</dd>
<dd><code>streams</code> - The existing sample streams, which will be updated to reflect the provided
     selections.</dd>
<dd><code>streamResetFlags</code> - Will be updated to indicate new sample streams, and sample streams that
     have been retained but with the requirement that the consuming renderer be reset.</dd>
<dd><code>positionUs</code> - The current playback position in microseconds. If playback of this period has
     not yet started, the value will be the starting position.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The actual position at which the tracks were enabled, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="discardBuffer(long,boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>discardBuffer</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;discardBuffer&#8203;(long&nbsp;positionUs,
                          boolean&nbsp;toKeyframe)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#discardBuffer(long,boolean)">MediaPeriod</a></code></span></div>
<div class="block">Discards buffered media up to the specified position.

 <p>This method is only called after the period has been prepared.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#discardBuffer(long,boolean)">discardBuffer</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The position in microseconds.</dd>
<dd><code>toKeyframe</code> - If true then for each track discards samples up to the keyframe before or at
     the specified position, rather than any sample before or at that position.</dd>
</dl>
</li>
</ul>
<a id="reevaluateBuffer(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reevaluateBuffer</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;reevaluateBuffer&#8203;(long&nbsp;positionUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#reevaluateBuffer(long)">MediaPeriod</a></code></span></div>
<div class="block">Re-evaluates the buffer given the playback position.

 <p>This method is only called after the period has been prepared.

 <p>A period may choose to discard buffered media or cancel ongoing loads so that media can be
 re-buffered in a different quality.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#reevaluateBuffer(long)">reevaluateBuffer</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/SequenceableLoader.html#reevaluateBuffer(long)">reevaluateBuffer</a></code>&nbsp;in interface&nbsp;<code><a href="../source/SequenceableLoader.html" title="interface in com.google.android.exoplayer2.source">SequenceableLoader</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The current playback position in microseconds. If playback of this period has
     not yet started, the value will be the starting position in this period minus the duration
     of any media in previous periods still to be played.</dd>
</dl>
</li>
</ul>
<a id="readDiscontinuity()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readDiscontinuity</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;readDiscontinuity()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#readDiscontinuity()">MediaPeriod</a></code></span></div>
<div class="block">Attempts to read a discontinuity.

 <p>After this method has returned a value other than <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a>, all <a href="../source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a>s provided by the period are guaranteed to start from a key frame.

 <p>This method is only called after the period has been prepared and before reading from any
 <a href="../source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a>s provided by the period.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#readDiscontinuity()">readDiscontinuity</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If a discontinuity was read then the playback position in microseconds after the
     discontinuity. Else <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a>.</dd>
</dl>
</li>
</ul>
<a id="getBufferedPositionUs()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBufferedPositionUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getBufferedPositionUs()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#getBufferedPositionUs()">MediaPeriod</a></code></span></div>
<div class="block">Returns an estimate of the position up to which data is buffered for the enabled tracks.

 <p>This method is only called when at least one track is selected.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#getBufferedPositionUs()">getBufferedPositionUs</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/SequenceableLoader.html#getBufferedPositionUs()">getBufferedPositionUs</a></code>&nbsp;in interface&nbsp;<code><a href="../source/SequenceableLoader.html" title="interface in com.google.android.exoplayer2.source">SequenceableLoader</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An estimate of the absolute position in microseconds up to which data is buffered, or
     <a href="../C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> if the track is fully buffered.</dd>
</dl>
</li>
</ul>
<a id="seekToUs(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>seekToUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;seekToUs&#8203;(long&nbsp;positionUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#seekToUs(long)">MediaPeriod</a></code></span></div>
<div class="block">Attempts to seek to the specified position in microseconds.

 <p>After this method has been called, all <a href="../source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a>s provided by the period are
 guaranteed to start from a key frame.

 <p>This method is only called when at least one track is selected.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#seekToUs(long)">seekToUs</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The seek position in microseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The actual position to which the period was seeked, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="getAdjustedSeekPositionUs(long,com.google.android.exoplayer2.SeekParameters)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAdjustedSeekPositionUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getAdjustedSeekPositionUs&#8203;(long&nbsp;positionUs,
                                      <a href="../SeekParameters.html" title="class in com.google.android.exoplayer2">SeekParameters</a>&nbsp;seekParameters)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#getAdjustedSeekPositionUs(long,com.google.android.exoplayer2.SeekParameters)">MediaPeriod</a></code></span></div>
<div class="block">Returns the position to which a seek will be performed, given the specified seek position and
 <a href="../SeekParameters.html" title="class in com.google.android.exoplayer2"><code>SeekParameters</code></a>.

 <p>This method is only called after the period has been prepared.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#getAdjustedSeekPositionUs(long,com.google.android.exoplayer2.SeekParameters)">getAdjustedSeekPositionUs</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The seek position in microseconds.</dd>
<dd><code>seekParameters</code> - Parameters that control how the seek is performed. Implementations may
     apply seek parameters on a best effort basis.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The actual position to which a seek will be performed, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="getNextLoadPositionUs()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextLoadPositionUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getNextLoadPositionUs()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#getNextLoadPositionUs()">MediaPeriod</a></code></span></div>
<div class="block">Returns the next load time, or <a href="../C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> if loading has finished.

 <p>This method is only called after the period has been prepared. It may be called when no
 tracks are selected.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#getNextLoadPositionUs()">getNextLoadPositionUs</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/SequenceableLoader.html#getNextLoadPositionUs()">getNextLoadPositionUs</a></code>&nbsp;in interface&nbsp;<code><a href="../source/SequenceableLoader.html" title="interface in com.google.android.exoplayer2.source">SequenceableLoader</a></code></dd>
</dl>
</li>
</ul>
<a id="continueLoading(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>continueLoading</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;continueLoading&#8203;(long&nbsp;positionUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#continueLoading(long)">MediaPeriod</a></code></span></div>
<div class="block">Attempts to continue loading.

 <p>This method may be called both during and after the period has been prepared.

 <p>A period may call <a href="../source/SequenceableLoader.Callback.html#onContinueLoadingRequested(T)"><code>SequenceableLoader.Callback.onContinueLoadingRequested(SequenceableLoader)</code></a> on the
 <a href="../source/MediaPeriod.Callback.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod.Callback</code></a> passed to <a href="../source/MediaPeriod.html#prepare(com.google.android.exoplayer2.source.MediaPeriod.Callback,long)"><code>MediaPeriod.prepare(Callback, long)</code></a> to request that this method be
 called when the period is permitted to continue loading data. A period may do this both during
 and after preparation.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#continueLoading(long)">continueLoading</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/SequenceableLoader.html#continueLoading(long)">continueLoading</a></code>&nbsp;in interface&nbsp;<code><a href="../source/SequenceableLoader.html" title="interface in com.google.android.exoplayer2.source">SequenceableLoader</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The current playback position in microseconds. If playback of this period has
     not yet started, the value will be the starting position in this period minus the duration
     of any media in previous periods still to be played.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if progress was made, meaning that <a href="../source/MediaPeriod.html#getNextLoadPositionUs()"><code>MediaPeriod.getNextLoadPositionUs()</code></a> will return a
     different value than prior to the call. False otherwise.</dd>
</dl>
</li>
</ul>
<a id="isLoading()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLoading</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isLoading()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../source/MediaPeriod.html#isLoading()">MediaPeriod</a></code></span></div>
<div class="block">Returns whether the media period is currently loading.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/MediaPeriod.html#isLoading()">isLoading</a></code>&nbsp;in interface&nbsp;<code><a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source">MediaPeriod</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../source/SequenceableLoader.html#isLoading()">isLoading</a></code>&nbsp;in interface&nbsp;<code><a href="../source/SequenceableLoader.html" title="interface in com.google.android.exoplayer2.source">SequenceableLoader</a></code></dd>
</dl>
</li>
</ul>
<a id="createSampleStream(com.google.android.exoplayer2.upstream.Allocator,com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher,com.google.android.exoplayer2.drm.DrmSessionManager,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format,java.util.List)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createSampleStream</h4>
<pre class="methodSignature">protected&nbsp;<a href="FakeSampleStream.html" title="class in com.google.android.exoplayer2.testutil">FakeSampleStream</a>&nbsp;createSampleStream&#8203;(<a href="../upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;allocator,
                                              @Nullable
                                              <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source">MediaSourceEventListener.EventDispatcher</a>&nbsp;mediaSourceEventDispatcher,
                                              <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a>&nbsp;drmSessionManager,
                                              <a href="../drm/DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a>&nbsp;drmEventDispatcher,
                                              <a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;initialFormat,
                                              <a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="FakeSampleStream.FakeSampleStreamItem.html" title="class in com.google.android.exoplayer2.testutil" target="_top">FakeSampleStream.FakeSampleStreamItem</a>&gt;&nbsp;fakeSampleStreamItems)</pre>
<div class="block">Creates a new <a href="FakeSampleStream.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeSampleStream</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSourceEventDispatcher</code> - A <a href="../source/MediaSourceEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.source"><code>MediaSourceEventListener.EventDispatcher</code></a> to notify
     of media events.</dd>
<dd><code>drmSessionManager</code> - A <a href="../drm/DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionManager</code></a> for DRM interactions.</dd>
<dd><code>drmEventDispatcher</code> - A <a href="../drm/DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm"><code>DrmSessionEventListener.EventDispatcher</code></a> to notify of DRM
     events.</dd>
<dd><code>initialFormat</code> - The first <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> to output.</dd>
<dd><code>fakeSampleStreamItems</code> - The <a href="FakeSampleStream.FakeSampleStreamItem.html" title="class in com.google.android.exoplayer2.testutil"><code>items</code></a> to output.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new <a href="FakeSampleStream.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeSampleStream</code></a>.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
